<%-- 
    Document   : index
    Created on : 6 avr. 2012, 14:35:49
    Author     : Alain Janin-Manificat <alain.janinm@hotmail.fr>
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%request.getSession().setAttribute("current_page","index");%>


<!DOCTYPE html>
<html lang="fr">
    <head>
        <meta charset="utf-8">
        <title>.: ESGI - PKI :.</title>

        <link rel="icon" type="image/png" href="assets/img/favicon.png" />
        
        <link rel="stylesheet" href="assets/css/bootstrap.min.css">
        <link rel="stylesheet" href="assets/css/bootstrap-datepicker.css">
        <link rel="stylesheet" href="assets/css/style.css">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
        <script src="assets/js/jquery.tablesorter.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
        <script src="assets/js/bootstrap-dropdown.js"></script>
        <script src="assets/js/bootstrap-datepicker.js"></script>
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="#">ESGI PKI Project</a>
                    <div class="nav-collapse">
                        <% if ((request.getSession().getAttribute("login")) != null) { %>
                            <ul class="nav">
                                <li><a href="<%=request.getContextPath()%>/index?action=yourkeys">Your keys</a></li>
                                <li><a href="<%=request.getContextPath()%>/index?action=publickeys">Public keys</a></li>
                                <li><a href="<%=request.getContextPath()%>/index?action=revokedkeys">Revoked keys</a></li>
                            </ul>
                            <ul class="nav pull-right">
                                <li class="divider-vertical"></li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                        Logged in as <%=request.getSession().getAttribute("login")%>
                                        <b class="caret"></b>
                                    </a>
                                    <ul class="dropdown-menu">
                                        <li class="divider"></li>
                                        <li>
                                            <a href="<%=request.getContextPath()%>/index?action=logoff">
                                                <i class="icon-off icon-black"></i> Log out
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        <% } %>
                    </div>
                </div>
            </div>
        </div>

        <div class="container">

            <%                           
                out.flush();
                if (request.getSession().getAttribute("action") != null) {
                    request.getRequestDispatcher("/view/" + request.getSession().getAttribute("action")).include(request, response);
                } else {
                    request.getRequestDispatcher("/view/accueil.jsp").include(request, response);
                }                                                                                        
            %>     
        </div>
        <script>
            $('.dropdown-toggle').dropdown();
        </script>
    </body>
</html>